package com.talos.ums.controller.admin.user.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 用户表新增/修改 Request VO")
@Data
public class UmsUserSaveReqVO {

    @Schema(description = "自增id", requiredMode = Schema.RequiredMode.REQUIRED, example = "31126")
    private Long id;

    @Schema(description = "用户账号", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿")
    @NotEmpty(message = "用户账号不能为空")
    private String userName;

    @Schema(description = "密码")
    private String password;

    @Schema(description = "用户名称", example = "赵六")
    private String nickName;

    @Schema(description = "手机号")
    private String phone;

    @Schema(description = "邮箱地址")
    private String mailAddress;

    @Schema(description = "性别: 0-女 1-男")
    private Integer gender;

    @Schema(description = "头像url", example = "https://www.iocoder.cn")
    private String headImgUrl;

    @Schema(description = "用户类型：0-企业级，1-复合级，2-多仓级，3-单仓级", example = "1")
    private Integer userType;

    @Schema(description = "失效日期")
    private LocalDate expirationDate;

    @Schema(description = "授权域")
    private String authorize;

    @Schema(description = "密码过期时间")
    private LocalDateTime passwordExpirationDate;

    @Schema(description = "锁定时间")
    private LocalDateTime lockDate;

    @Schema(description = "登录次数")
    private Integer loginTimes;

    @Schema(description = "是否新用户: 0-否,1-是")
    private Integer newAccountFlag;

    @Schema(description = "其他信息", example = "随便")
    private String remark;

    @Schema(description = "是否有效：0-无效，1-有效", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "是否有效：0-无效，1-有效不能为空")
    private Integer activeFlag;

    @Schema(description = "语言类型，默认中文")
    private String language;

    @Schema(description = "用户登录系统标识", example = "27884")
    private String passUid;

    @Schema(description = "是否需要修改密码 0-否 1-是")
    private Integer needModifyPassword;

    @Schema(description = "无效时的id", example = "9168")
    private Long repeatUserId;

    @Schema(description = "货主编码")
    private String companyCode;

    @Schema(description = "工号")
    private String jobNumber;

    @Schema(description = "获得所有角色权限标识，1是，2否")
    private Integer allRole;

    @Schema(description = "所有仓库标识，1是，2否")
    private Integer allWarehouse;

    @Schema(description = "所有货主标识，1是，2否")
    private Integer allCompany;

    @Schema(description = "所有组织标识，1是，2否")
    private Integer allOrganization;

    @Schema(description = "是admin级别的用户,1是 2否")
    private Integer toAdmin;

    @Schema(description = "是否拥有所有站点权限，1是，2否")
    private Integer allStation;

    @Schema(description = "来源", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "来源不能为空")
    private String source;

    @Schema(description = "来源", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotEmpty(message = "来源不能为空")
    private String sourceDesc;

    @Schema(description = "是否拥有所有承运商权限 1是 2否", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "是否拥有所有承运商权限 1是 2否不能为空")
    private Integer allCarrier;

    @Schema(description = "是否拥有所有往来单位权限 1是 2否", requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "是否拥有所有往来单位权限 1是 2否不能为空")
    private Integer allCustomer;

}
